<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>外卖返现</title>
    <link rel="stylesheet" type="text/css" href="../../css/aui.css" />
    <style media="screen">
        .wrap {
            width: 100%;
            padding: 0 5px;
            box-sizing: border-box;
            overflow: hidden;
        }

        .wrap ul {
            width: 100%;
            overflow: hidden;
        }

        .wrap ul li {
            width: 100%;
            background: #FFFFFF;
            border-radius: 8px;
            padding: 7px 11px;
            padding-bottom: 0px;
            margin-top: 10px;
            overflow: hidden;
        }

        .getpacket {
            width: 100%;
            display: flex;
            /*justify-content: space-between;*/
            overflow: hidden;
        }

        .getpacket .icon {
            width: 24px;
            height: 24px;
        }

        .getpacket .icon img {
            display: block;
            width: 100%;
            height: 100%;
        }

        .getpacket .text {
            width: auto;
            height: 24px;
            line-height: 24px;
            font-size: 12px;
            font-family: PingFang SC;
            font-weight: 400;
            color: #333333;
            margin-left: 9px;
        }

        .getpacket .everyget {
            width: 47px;
            height: 15px;
            line-height: 15px;
            margin-top: 4.5px;
            text-align: center;
            font-size: 12px;
            font-family: PingFang SC;
            font-weight: 400;
            color: #fff;
            background: linear-gradient(266deg, #D116FD, #7D0DFC);
            border-radius: 0px 7.5px 0px 7.5px;
            margin-left: 5px;
        }

        .getpacket .onceget {
            width: auto;
            height: 20px;
            line-height: 20px;
            margin-top: 2px;
            text-align: center;
            padding: 0 8px;
            font-size: 12px;
            font-family: PingFang SC;
            font-weight: 400;
            color: #fff;
            background: linear-gradient(266deg, #D116FD, #7D0DFC);
            border-radius: 10.5px;
            margin-left: auto;
        }

        .packet_bg {
            width: 100%;
            height: 113px;
            margin-top: 16.5px;
        }

        .packet_bg img {
            display: block;
            width: 100%;
            height: 100%;
        }
    </style>
</head>

<body>
    <div id="app">
        <div class="wrap">
            <ul>
                <li @click='openElePage()'>
                    <div class="getpacket">
                        <div class="icon"><img src="../../image/ele_icon.png" alt=""></div>
                        <div class="text">饿了么红包</div>
                        <div class="everyget">每天领</div>
                        <div class="onceget">立即领取></div>
                    </div>
                    <div class="packet_bg"><img src="../../image/packet_bg.png" alt=""></div>
                </li>
                <li @click='openMtPage()'>
                    <div class="getpacket">
                        <div class="icon"><img src="../../image/mt_ele_icon.png" alt=""></div>
                        <div class="text">美团外卖红包</div>
                        <div class="everyget">每天领</div>
                        <div class="onceget">立即领取></div>
                    </div>
                    <div class="packet_bg"><img src="../../image/mt_packet_bg.png" alt=""></div>
                </li>
            </ul>
        </div>
    </div>
</body>
<script type="text/javascript" src="../../script/api.js"></script>
<script type="text/javascript" src="../../script/vue.js"></script>
<script type="text/javascript" src="../../script/cling.js"></script>
<script type="text/javascript">
    apiready = function() {

    }
    var vm = new Vue({
        el: '#app',
        data: {

        },
        methods: {
            openElePage: function() {
                cl.openWin({
                    name: 'ele_page'
                })
            },
            openMtPage:function(){
              api.ajax({
                  url: cl.apiServer + 'cpssystemConfig/getCategoryList',
                  method: 'post',
                  headers: {
                      'Content-Type': 'application/json;charset=utf-8',
                      token:cl.userToken
                  },
                  data: {
                      body: {
                          type:13,
                          version:cl.deviceInfo().appVersion,
                          mobileInfo:cl.systemType()
                      }
                  }
              }, function(ret, err) {
                  console.log(JSON.stringify(ret));
                  if (ret) {
                      if (ret.code == 0) {
                        cl.openWin({
                            name: '../../brower',
                            pageParam: {
                                link: ret.data[0].cvalue
                            }
                        });
                        // vm.serviceInfo = ret.data.cvalue;
                          // vm.dataList = ret.data;
                      }
                  }
              });
            },
        }
    });
</script>

</html>
